alloy-json-abi
Full Ethereum JSON-ABI implementation.
This crate is a re-implementation of a part of ethabi's API, with a few main differences:
- the
Contract
struct is now calledJsonAbi
and also contains thefallback
andreceive
functions - the
Param
andEventParam
structs only partially parse the type string instead of fully resolving it into a Solidity type
Examples
Parse a JSON ABI file into a JsonAbi
struct:
use JsonAbi;
# stringify!;
# let json = "[]";
let abi: JsonAbi = from_str.unwrap;
for item in abi.items